#encoding: utf-8
import os

SECRET_KEY = os.urandom(24)

DEBUG = True

DB_USERNAME = 'root'
DB_PASSWORD = '123456'
DB_HOST = '127.0.0.1'
DB_PORT = '3306'
DB_NAME = 'qfbbs'

# PERMANENT_SESSION_LIFETIME =

DB_URI = 'mysql+pymysql://%s:%s@%s:%s/%s?charset=utf8' % (DB_USERNAME,DB_PASSWORD,DB_HOST,DB_PORT,DB_NAME)

SQLALCHEMY_DATABASE_URI = DB_URI
SQLALCHEMY_TRACK_MODIFICATIONS = False


CMS_USER_ID = 'ASDFASDFSA'
FRONT_USER_ID = 'SDFASFSD234320645KSDLFD'

# MAIL_USE_TLS：端口号587
# MAIL_USE_SSL：端口号465
# QQ邮箱不支持非加密方式发送邮件
# 发送者邮箱的服务器地址
MAIL_SERVER = "smtp.qq.com"
MAIL_PORT = '587'
MAIL_USE_TLS = True
#MAIL_USE_SSL = True
MAIL_USERNAME = '2287228249@qq.com'
MAIL_PASSWORD = 'mwwlkcobywhpebcj'
MAIL_DEFAULT_SENDER = '2287228249@qq.com'

## 阿里大于


# 阿里云短信相关配置
ACCESS_KEY_ID= 'uXIWtuAQspvFqpCt'
ACCESS_KEY_SECRET = 'g4dRrretS3HDiACJuwkaUzoUgUG8C4'
ALIDAYU_SIGN_NAME = '小饭桌管理平台'
ALIDAYU_TEMPLATE_CODE = 'SMS_146806055'


# UEditor的相关配置
UEDITOR_UPLOAD_TO_QINIU = True
UEDITOR_QINIU_ACCESS_KEY = "p_p2-jutlTI1mlPCSfMEO8DyZnkQaiFrd9IOlvpz"
UEDITOR_QINIU_SECRET_KEY = "rN0YQux570vbhL5d8QvShrV-SnjzTdqhlfWstWri"
UEDITOR_QINIU_BUCKET_NAME = "wangfan91"
UEDITOR_QINIU_DOMAIN = "http://7xqenu.com1.z0.glb.clouddn.com/"

#celery
CELERY_RESULT_BACKEND = "redis://127.0.0.1:6379/0"
CELERY_BROKER_URL = "redis://127.0.0.1:6379/0"


#flask-paginate
PER_PAGE = 10